package com.dd.stack.se.stream.simple.pijo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * @Author liuxianmeng
 * @CreateTime 2024/11/14 23:51
 * @Description 流式计算辅助模拟类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "学生信息类")
public class StudentBO {
    @ApiModelProperty(value = "学生姓名", example = "张三")
    private String name;
    @ApiModelProperty(value = "学生年龄", example = "20")
    private int age;
    @ApiModelProperty(value = "学生成绩", example = "85.5")
    private double score;
    @ApiModelProperty(value = "学生编号", example = "1234567890")
    private Long studentId;
    @ApiModelProperty(value = "学生爱好列表", example = "[\"绘画\", \"阅读\"]")
    private List<String> hobbies;
    @ApiModelProperty(value = "课程成绩映射", example = "{\"数学\": 90, \"语文\": 85}")
    private Map<String, Integer> courseGrades;
    @ApiModelProperty(value = "学生地址信息")
    private Address address;
    @ApiModelProperty(value = "是否参加高级课程", example = "true")
    private boolean isEnrolledInAdvancedCourses;
    @ApiModelProperty(value = "缺勤次数", example = "3")
    private Integer numberOfAbsences;
    @ApiModelProperty(value = "平均绩点", example = "3.5")
    private Double gpa;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(description = "学生地址信息类")
    public static class Address {
        @ApiModelProperty(value = "街道名称", example = "中山路")
        private String street;
        @ApiModelProperty(value = "城市名称", example = "北京市")
        private String city;
        @ApiModelProperty(value = "州/省代码", example = "10")
        private int stateCode;
        @ApiModelProperty(value = "邮政编码", example = "100000")
        private long zipCode;
        @ApiModelProperty(value = "附近地点列表", example = "[\"公园\", \"超市\"]")
        private List<String> nearbyPlaces;
        @ApiModelProperty(value = "到兴趣点的距离映射", example = "{\"学校\": 500.5}")
        private Map<String, Double> distancesToPointsOfInterest;
    }
}